// 导入Vue模块
import {  createRouter,createWebHistory } from "vue-router"
import TodoList from '@/views/todolist.vue'
import DatePicker from '@/views/datePicker.vue'
import Select from '@/views/select.vue'

import {  createRouter,createWebHistory } from "vue-router";
import TodoList from '@/views/todolist.vue';
import DatePicker from '@/views/date-picker.vue';
import Comment from "../views/comment.vue";
import PicPreview from '@/views/pic-preview.vue';

// 定义路由数组
const routes = [
     // 配置规则
  {path: '/todolist', component: TodoList},
  {path: '/date-picker', component: DatePicker}
  ,{path: '/select', component: Select}
  { path: '/todolist', component: TodoList },
       { path: '/date-picker', component: DatePicker },
       { path: '/comment', component: Comment },
       { path: '/pic-preview', component: PicPreview },
]

// 创建VueRouter实例
const router = createRouter({
  history: createWebHistory(),
  routes
})

// 导出router实例
export default router